home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16570 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: portal.gmu.edu!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 11 Apr 96 10:30:12 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.829218612@rscernix>
  8. References: <dewar.828846122@schonberg> <828903511snz@genesis.demon.co.uk> <4kgjrc$4d@news.nyu.edu>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #7 (NOV)
  14.  
  15. In <4kgjrc$4d@news.nyu.edu> halvin@acf4.nyu.edu (halvin) writes:
  16.  
  17. >this might be slightly off-topic, but isn't there a difference between the
  18. >ANSI and POSIX versions of fprintf? if i remember correctly, the ANSI version
  19. >returns 0 on success and EOF on failure -- but the POSIX version returns the
  20. >number of characters printed, or a negative number to indicate failure.
  21.  
  22. This is what you get for relying on your (faulty) memory when dealing
  23. with standards issues.  From the ANSI C standard:
  24.  
  25.     The fprintf function returns the number of characters transmitted,
  26.     or a negative value if an output error occurred.
  27.  
  28. Dan
  29. --
  30. Dan Pop
  31. CERN, CN Division
  32. Email: danpop@mail.cern.ch 
  33. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  34.